import Taro, { Component } from '@tarojs/taro'
import { View, Text, Image, Picker, ScrollView, Checkbox } from '@tarojs/components'
import './shuruhuanzhexinxi.css'
import { AtInput, AtForm, AtGrid, AtList, AtListItem, AtTabs, AtTabsPane, AtAccordion, AtRadio ,AtButton, AtIcon, AtModal, AtModalHeader, AtModalContent, AtModalAction, AtCheckbox} from 'taro-ui'
import app from '../../../../main.js'

export default class Shuruhuanzhexinxi extends Component {
  config = {
    navigationBarTitleText: '患者信息输入'
  }
  constructor() {
    super(...arguments)
    this.state = {
      dateStr:'',
      valueaa:'',
      valuebb:'',
      valuecc:'',
      valuedd:'',
      open: false,
      open1: false,
      open2: false,
      open3: false,
      open4: false,
      value: '',
      value1: '',
      value2: '',
      value3: '',
      value4: '',
      value5: '',
      value6: '',
      value7: '',
      value8: '',
      value9: '',
      value10: '',
      value11: '',
      value12: '',
      value13: '',
      value14: '',
      value15: '',
      value16: '',
      value17: '',
      value18: '',
      value19: '',
      value20: '',
      value21: '',
      value22: '',
      value23: '',
      value24: '',
      value25: '',
      value26: '',
      value27: '',
      value28: '',
      value29: '',
      value30: '',
      value31: '',
      value32: '',
      value33: '',
      value34: '',
      value35: '',
      value36: '',
      value97: '',
      value98: '',
	    value99: '',
  	  doctorName:[],
      doctorNameDel:'医生名字',
  	  hospitalName:'[]',
  	  hospitalNameDel:'医院名字',
      sex:['男','女'],
      sexDel:'请选择',
      jobName:['工程师', '教师', '职员', '农民', '工人', '学生', '军人', '商人', '公务员', '医护人员', '无业', '其他'],
      jobNameDel:'请选择',
      wtw:['游标卡尺加角规','OCT','角膜地形图'],
      wtwDel:'请选择',
      age:[],
  	  ageDel:'',
  	  id: this.$router.params.id,
  	  docid:[],
  	  docids:this.$router.params.docid,
  	  zhushiyanL:'',
  	  zhushiyanR:'',
  	  boolean1:['否','是'],
  	  boolean1Del:'是',
  	  boolean2:['否','是'],
      boolean2Del:'是',
      timeSel: '请选择',
      bingliid:'',
      isOpened:false,
      calculateData:[]
    }
    // this.state = this.getData();
  }
  
  get(){
      let me = this
      let arr = []
      let brr = []
      let id = me.$router.params.id
      if(id == 0|| id == undefined){
        me.setState({
            id:'null'
        })
      }else{
        let data = {
            id:id
        }
        app.post('web/PRLOrder/orderDetail', data, function(res){
            arr = res.data.data.order
            brr = res.data.data.patient
            console.log(res)
            let pupildiaAr = brr.pupildiaAr == null ? '' : brr.pupildiaAr
            let pupildiaAl = brr.pupildiaAl == null ? '' : brr.pupildiaAl
            me.setState({
                value : brr.patientName,
                ageDel:brr.patientAge,
                value34:arr.remark,
                value99:brr.patientTel,
                timeSel:brr.hopeTime,
                wtwDel:brr.wtowFunc,
                jobNameDel:me.state.jobName[brr.patientAddr-1],
                sexDel:me.state.sex[brr.patientGender-1],
                value3:brr.recentStableiR,
                value4:brr.recentStableiL,
                value9:brr.axialR,
                value10:brr.axialL,
                value3:brr.preopucvaR,
                value4:brr.preopucvaL,
                value11:brr.preopucvaR,
                value12:brr.preopbcvaL,
                value13:brr.preopiopR,
                value14:brr.preopiopL,
                value15:brr.pupildiaMr,
                value16:brr.pupildiaMl,
                value17:pupildiaAr,
                value18:pupildiaAl,
                value19:brr.keratometryAr,
                value20:brr.keratometryAl,
                value21:brr.keratometryBr,
                value22:brr.keratometryBl,
                value24:brr.cellCountsR,
                value25:brr.cellCountsL,
                value26:brr.wtowR,
                value27:brr.wtowL,
                value28:brr.anteriorChamDepthR,
                value29:brr.anteriorChamDepthL,
                value30:brr.axialLengthR,
                value31:brr.axialLengthL,
                bingliid:brr.id,
                value97:brr.expectDegreesR,
                value98:brr.expectDegreesL,
                valueaa:brr.keratometryAxialRA,
                valuebb:brr.keratometryAxialLA,
                valuecc:brr.keratometryAxialRB,
                valuedd:brr.keratometryAxialLB,
                boolean1Del:me.state.boolean1[brr.recentStableiR],
                boolean2Del:me.state.boolean2[brr.recentStablenL]
               
            })
        })
      }     
  }

  handleClick(value) {
    this.setState({
      open: value
    })
  }
  handleClick1(value) {
    this.setState({
      open1: value
    })
  }
  handleClick2(value) {
    this.setState({
      open2: value
    })
  }
  handleClick3(value) {
    this.setState({
      open3: value
    })
  }
  handleClick4(value) {
    this.setState({
      open4: value
    })
  }

  handleChange(value) {
    this.setState({
      value
    })
  }
  handleChange1(value1) {
    this.setState({
      value1
    })
  }
  handleChange2(value2) {
    this.setState({
      value2
    })
  }
  handleChange3(value3) {
    this.setState({
      value3
    })
  }
  handleChange4(value4) {
    this.setState({
      value4
    })
  }
  handleChange5(value5) {
    this.setState({
      value5
    })
  }
  handleChange6(value6) {
    this.setState({
      value6
    })
  }
  handleChange7(value7) {
    this.setState({
      value7
    })
  }
  handleChange8(value8) {
    this.setState({
      value8
    })
  }
  handleChange9(value9) {
    this.setState({
      value9
    })
  }
  handleChange10(value10) {
    this.setState({
      value10
    })
  }
  handleChange11(value11) {
    this.setState({
      value11
    })
  }
  handleChange12(value12) {
    this.setState({
      value12
    })
  }
  handleChange13(value13) {
    this.setState({
      value13
    })
  }
  handleChange14(value14) {
    this.setState({
      value14
    })
  }
  handleChange15(value15) {
    this.setState({
      value15
    })
  }
  handleChange16(value16) {
    this.setState({
      value16
    })
  }
  handleChange17(value17) {
    this.setState({
      value17
    })
  }
  handleChange18(value18) {
    this.setState({
      value18
    })
  }
  handleChange19(value19) {
    this.setState({
      value19
    })
  }
  handleChange20(value20) {
    this.setState({
      value20
    })
  }
  handleChange21(value21) {
    this.setState({
      value21
    })
  }
  handleChange22(value22) {
    this.setState({
      value22
    })
  }
  handleChange23(value23) {
    this.setState({
      value23
    })
  }
  handleChange24(value24) {
    this.setState({
      value24
    })
  }
  handleChange25(value25) {
    this.setState({
      value25
    })
  }
  handleChange26(value26) {
    this.setState({
      value26
    })
  }
  handleChange27(value27) {
    this.setState({
      value27
    })
  }
  handleChange28(value28) {
    this.setState({
      value28
    })
  }
  handleChange29(value29) {
    this.setState({
      value29
    })
  }
  handleChange30(value30) {
    this.setState({
      value30
    })
  }
  handleChange31(value31) {
    this.setState({
      value31
    })
  }
  handleChange32(value32) {
    this.setState({
      value32
    })
  }
  handleChange33(value33) {
    this.setState({
      value33
    })
  }
  handleChange34(value34) {
    this.setState({
      value34
    })
  }
  handleChange35(value35,res) {
	let me = this
	let eye = res.label
	if(eye=='左眼'){
		me.setState({
			zhushiyanL:1,
			zhushiyanR:0
		},()=>{console.log(me.state.zhushiyanR,me.state.zhushiyanL)})
	}else{
		me.setState({
			zhushiyanL:0,
			zhushiyanR:1
		})
	}
    this.setState({
      value35
    })
  }
  handleChange36(value36) {
    this.setState({
      value36
    })
  }
  handleChange97(value97) {
    this.setState({
      value97
    })
  }
  handleChange98(value98) {
    this.setState({
      value98
    })
  }
  handleChange99(value99) {
    this.setState({
      value99
    })
  }
  handleChangeaa(valueaa) {
    this.setState({
      valueaa
    })
  }
  handleChangebb(valuebb) {
    this.setState({
      valuebb
    })
  }
  handleChangecc(valuecc) {
    this.setState({
      valuecc
    })
  }
  handleChangedd(valuedd) {
    this.setState({
      valuedd
    })
  }

  changeAge(ageDel) {
    this.setState({
        ageDel
    })
  }

  age(){
    let me= this;
    let arr = [];
    for(let i = 1; i<99; i++){
      arr.push(i)
    }
    me.setState({
      age:arr
    })
  }

  doctorName(){
	  let me = this;
	  let data = {};
	  let hos = [];
	  let doc = [];
	  let docid =[];
	  let arr = [];
	  app.post('web/PRLOrder/getDoctorList', data , function(res){
          console.log(res)
		  arr = res.data.data
		  for(let val of arr){
			  doc.push(val.doctorName)
			  hos.push(val.hospital)
			  docid.push(val.doctorId)
		  }
		  me.setState({
			  hospitalName:hos,
			  doctorName:doc,
			  docid:docid
		  },()=>{
            //   console.log(me.state.docid)
            //   console.log(me.state.docid.indexOf(me.state.docids))
              me.setState({
                  doctorNameDel:me.state.doctorName[me.state.docid.indexOf(me.state.docids)],
                  hospitalNameDel:me.state.hospitalName[me.state.docid.indexOf(me.state.docids)]
              })
          })
	  })
  }

  go(id){
        let me = this
        //计算按钮
        if(id == 0){
            if(this.state.value26 == ''|| this.state.value27 == ''|| this.state.value97 == ''|| this.state.value98 == ''){
                Taro.showModal({
                    title: '警告',
                    content: '请输入医生期望矫正度数与角膜水平直径进行计算',
                    showCancel:false
                  })
            }else{
                let data = {
                    wtowR:me.state.value26,
                    wtowL:me.state.value27,
                    expectDegreesR:me.state.value97,
                    expectDegreesL:me.state.value98
                }
                app.post('web/PRLOrder/calculate', data, function(res){
                    console.log(res.data.result.data.left[0])
                    let arr = res.data.result.data.left
                    me.setState({
                      calculateData:arr,
                      isOpened:true
                    })
                    // Taro.showModal({
                    //     title: '计算结果',
                    //     content: 'id：'+ arr.id + 'ㅤㅤ' +'型号：'+arr.eyeModel +  'ㅤㅤ' +'产品标识：'+ arr.producIdentification +'ㅤㅤ' + '实际矫正度数：'+arr.analogFocal +'ㅤㅤ' +'医生期望矫正度数：'+arr.expectDegrees+'ㅤㅤ' +'实际与期望矫正度数差值：'+arr.expectDegreesDifference +'ㅤㅤ' +'是否推荐方案：'+ arr.bestFangan ,
                    //     showCancel:false
                    // })
                })
            }
        //保存草稿按钮
        }else if(id == 1){
            let data = {}
            if(me.$router.params.id == 0 ){
              console.log(88888888888,me.state.value)
                data = {
                    doctorId:me.state.docids ,
                    patientId:me.state.dateStr,
                    patientName:me.state.value,
                    patientAge:me.state.ageDel,
                    patientGender:me.state.sex.indexOf(me.state.sexDel)+1,
                    patientAddr:me.state.jobName.indexOf(me.state.jobNameDel)+1,
                    hospital:me.state.hospitalNameDel,
                    patientTel:me.state.value99,
                    right:me.state.zhushiyanR,
                    left:me.state.zhushiyanL ,
                    hopeTime:me.state.timeSel,
                    recentStableiR:me.state.boolean1.indexOf(me.state.boolean1Del),
                    recentStablenL:me.state.boolean2.indexOf(me.state.boolean2Del),
                    productModel1:'BK108',
                    productModel2:'BK108',
                    //非必要
                    preopucvaL:me.state.value4,
                    preopucvaR:me.state.value3,
                    axialR:me.state.value9,
                    axialL:me.state.value10,
                    preopbcvaL:me.state.value12,
                    preopucvaR:me.state.value11,
                    preopiopL:me.state.value14,
                    preopiopR:me.state.value13,
                    pupildiaMl:me.state.value16,
                    pupildiaMr:me.state.value15,
                    pupildiaAl:me.state.value18,
                    pupildiaAr:me.state.value17,
                    keratometryAl:me.state.value20,
                    keratometryAr:me.state.value19,
                    keratometryBl:me.state.value22,
                    keratometryBr:me.state.value21,
                    cellCountsL:me.state.value25,
                    cellCountsR:me.state.value24,
                    wtowL:me.state.value27,
                    wtowR:me.state.value26,
                    anteriorChamDepthL:me.state.value29,
                    anteriorChamDepthR:me.state.value28,
                    axialLengthL:me.state.value31,
                    axialLengthR:me.state.value30,
                    wtowFunc:me.state.wtwDel,
                    remark:me.state.value34,
                    expectDegreesL:me.state.value98,
                    expectDegreesR:me.state.value97,
                    keratometryAxialRA:me.state.valueaa,
                    keratometryAxialLA:me.state.valuebb,
                    keratometryAxialRB:me.state.valuecc,
                    keratometryAxialLB:me.state.valuedd,
                }
            }else{
              console.log(7777777777,me.state.value)
                data = {
                    id:me.state.id,
                    doctorId:me.state.docids ,
                    patientId:me.state.dateStr,
                    patientName:me.state.value,
                    patientAge:me.state.ageDel,
                    patientGender:me.state.sex.indexOf(me.state.sexDel)+1,
                    patientAddr:me.state.jobName.indexOf(me.state.jobNameDel)+1,
                    hospital:me.state.hospitalNameDel,
                    patientTel:me.state.value99,
                    right:me.state.zhushiyanR,
                    left:me.state.zhushiyanL,
                    hopeTime:me.state.timeSel,
                    recentStableiR:me.state.boolean1.indexOf(me.state.boolean1Del),
                    recentStablenL:me.state.boolean2.indexOf(me.state.boolean2Del),
                    productModel1:'BK108',
                    productModel2:'BK108',
                    //非必要
                    preopucvaL:me.state.value4,
                    preopucvaR:me.state.value3,
                    axialR:me.state.value9,
                    axialL:me.state.value10,
                    preopbcvaL:me.state.value12,
                    preopucvaR:me.state.value11,
                    preopiopL:me.state.value14,
                    preopiopR:me.state.value13,
                    pupildiaMl:me.state.value16,
                    pupildiaMr:me.state.value15,
                    pupildiaAl:me.state.value18,
                    pupildiaAr:me.state.value17,
                    keratometryAl:me.state.value20,
                    keratometryAr:me.state.value19,
                    keratometryBl:me.state.value22,
                    keratometryBr:me.state.value21,
                    cellCountsL:me.state.value25,
                    cellCountsR:me.state.value24,
                    wtowL:me.state.value27,
                    wtowR:me.state.value26,
                    anteriorChamDepthL:me.state.value29,
                    anteriorChamDepthR:me.state.value28,
                    axialLengthL:me.state.value31,
                    axialLengthR:me.state.value30,
                    wtowFunc:me.state.wtwDel,
                    remark:me.state.value34,
                    expectDegreesL:me.state.value98,
                    expectDegreesR:me.state.value97,
                    keratometryAxialRA:me.state.valueaa,
                    keratometryAxialLA:me.state.valuebb,
                    keratometryAxialRB:me.state.valuecc,
                    keratometryAxialLB:me.state.valuedd,
                }
            }        
            app.post('web/PRLOrder/saveDraft', data, function(res){
                if(res.statusCode == 422){
                    Taro.showModal({
                        title: '警告',
                        content: '必填信息必须填写正确才能提交',
                        showCancel:false
                      })
                }else{
                    app.navigateTo('../../../doctorpages/homepage/homepage')
                }
            })
        }else{
            //保存订单按钮
            if(me.$router.params.id == 0){
                me.go1();
            }else{
                me.go2();
            }
        }       
  }

  go1(){
    console.log('go1',this.state.docids)
    console.log(parseInt(this.state.docids) )
	let me = this.state
	let data = {
        //必要字段
        // id:me.id,
        doctorId:me.docids,
        patientId:me.dateStr,
        patientName:me.value,
        patientAge:me.ageDel,
        patientGender:me.sex.indexOf(me.sexDel)+1,
        patientAddr:me.jobName.indexOf(me.jobNameDel)+1,
        hospital:me.hospitalNameDel,
        patientTel:me.value99,
        right:me.zhushiyanR,
        left:me.zhushiyanL,
        hopeTime:me.timeSel,
        recentStableiR:me.boolean1.indexOf(me.boolean1Del),
        recentStablenL:me.boolean2.indexOf(me.boolean2Del),
        productModel1:'BK108',
        productModel2:'BK108',
        //非必要
        preopucvaL:me.value4,
        preopucvaR:me.value3,
        axialR:me.value9,
        axialL:me.value10,
        preopbcvaL:me.value12,
        preopucvaR:me.value11,
        preopiopL:me.value14,
        preopiopR:me.value13,
        pupildiaMl:me.value16,
        pupildiaMr:me.value15,
        pupildiaAl:me.value18,
        pupildiaAr:me.value17,
        keratometryAl:me.value20,
        keratometryAr:me.value19,
        keratometryBl:me.value22,
        keratometryBr:me.value21,
        cellCountsL:me.value25,
        cellCountsR:me.value24,
        wtowL:me.value27,
        wtowR:me.value26,
        anteriorChamDepthL:me.value29,
        anteriorChamDepthR:me.value28,
        axialLengthL:me.value31,
        axialLengthR:me.value30,
        wtowFunc:me.wtwDel,
        remark:me.value34,
        expectDegreesL:me.value98,
        expectDegreesR:me.value97,
        keratometryAxialRA:me.valueaa,
        keratometryAxialLA:me.valuebb,
        keratometryAxialRB:me.valuecc,
        keratometryAxialLB:me.valuedd,
    }
    
    // console.log(data)

	if(this.state.boolean1Del == '否' && this.state.boolean2Del == '否'){
        Taro.showModal({
            title: '警告',
            content: '近一年屈光稳定必须有一个为是',
            showCancel:false
          })
    }else{
        // console.log('9090')
        app.post('web/PRLOrder/createOrder',data,function(res){
            console.log(res)
            if(res.statusCode == 200){
                app.navigateTo('../../../doctorpages/homepage/homepage')
            }else{
                Taro.showModal({
                    title: '警告',
                    content: '必填信息必须填写正确才能提交',
                    showCancel:false
                })
            }
        })
    }
  }

  go2(){
    console.log('go2')
	let me = this.state
	let data = {
        //必要字段
        id:this.$router.params.id,
        doctorId:me.docids,
        patientId:me.dateStr,
        patientName:me.value,
        patientAge:me.ageDel,
        patientGender:me.sex.indexOf(me.sexDel)+1,
        patientAddr:me.jobName.indexOf(me.jobNameDel)+1,
        hospital:me.hospitalNameDel,
        patientTel:me.value99,
        right:me.zhushiyanR,
        left:me.zhushiyanL,
        hopeTime:me.timeSel,
        recentStableiR:me.boolean1.indexOf(me.boolean1Del),
        recentStablenL:me.boolean2.indexOf(me.boolean2Del),
        productModel1:'BK108',
        productModel2:'BK108',
        //非必要
        preopucvaL:me.value4,
        preopucvaR:me.value3,
        axialR:me.value9,
        axialL:me.value10,
        preopbcvaL:me.value12,
        preopucvaR:me.value11,
        preopiopL:me.value14,
        preopiopR:me.value13,
        pupildiaMl:me.value16,
        pupildiaMr:me.value15,
        pupildiaAl:me.value18,
        pupildiaAr:me.value17,
        keratometryAl:me.value20,
        keratometryAr:me.value19,
        keratometryBl:me.value22,
        keratometryBr:me.value21,
        cellCountsL:me.value25,
        cellCountsR:me.value24,
        wtowL:me.value27,
        wtowR:me.value26,
        anteriorChamDepthL:me.value29,
        anteriorChamDepthR:me.value28,
        axialLengthL:me.value31,
        axialLengthR:me.value30,
        wtowFunc:me.wtwDel,
        remark:me.value34,
        expectDegreesL:me.value98,
        expectDegreesR:me.value97,
        keratometryAxialRA:me.valueaa,
        keratometryAxialLA:me.valuebb,
        keratometryAxialRB:me.valuecc,
        keratometryAxialLB:me.valuedd,
    }
    
    // console.log(data)

    if(this.state.boolean1Del == '否' && this.state.boolean2Del == '否'){
        Taro.showModal({
            title: '警告',
            content: '近一年屈光稳定必须有一个为是',
            showCancel:false
          })
    }else{
        // console.log('9090')
        app.post('web/PRLOrder/createOrder',data,function(res){
            console.log(res)
            if(res.statusCode == 200){
                app.navigateTo('../../../doctorpages/homepage/homepage')
            }else{
                Taro.showModal({
                    title: '警告',
                    content: '必填信息必须填写正确才能提交',
                    showCancel:false
                  })
            }
        })        
    }

	
  }

  componentWillMount() { 
	this.age();
    this.doctorName();
    this.get();
    var nowDate = new Date();
    var year = nowDate.getFullYear();
    var month = nowDate.getMonth() + 1 < 10 ? "0" + (nowDate.getMonth() + 1)
    : nowDate.getMonth() + 1;
    var day = nowDate.getDate() < 10 ? "0" + nowDate.getDate() : nowDate
    .getDate();
    var dateStr = year +  month +  day;
    this.setState({
        dateStr:dateStr
    })
  }

  onChangeSex = e => {
    this.setState({
      sexDel: this.state.sex[e.detail.value]
    })
  }

  onChangeJob = e => {
    this.setState({
      jobNameDel: this.state.jobName[e.detail.value]
    })
  }

  onChangeAge = e => {
    this.setState({
      ageDel: this.state.age[e.detail.value]
    })
  }

  onChangeWTW = e => {
    this.setState({
      wtwDel: this.state.wtw[e.detail.value]
    })
  }

  onChangeBoolean1 = e => {
    this.setState({
	  boolean1Del: this.state.boolean1[e.detail.value],
    })
  }
  onChangeBoolean2 = e => {
    this.setState({
	  boolean2Del: this.state.boolean2[e.detail.value],
    })
  }
  onTimeChange = e => {
    this.setState({
      timeSel: e.detail.value
    })
  }

  closeModel (e) {
    e.stopPropagation()
    this.setState({
      isOpened:false
    })
  }


  render() {
    return (
      <View className='shuruhuanzhexinxi'>
        <AtList>

            <View className='box4'><View className='box5'>基本信息（带 * 为必填部分）</View></View>
            <View className='box'>
                <View className='xiangming1'>医生名字</View>
                <AtInput className='shuru'
                name='value'
                type='text'
                editable={false}
                value={this.state.doctorNameDel}
                />
            </View>

          <View className='box'>
		  	<View className='xiangming1'>医院</View>
            <AtInput className='shuru'
              name='value'
              type='text'
              editable={false}
              value={this.state.hospitalNameDel}
            />
          </View>
          <View className='box'>
            <View className='xiangming1'>患者姓名 *</View>
			<AtInput className='shuru'
			       maxLength='10'
              name='value'
              type='text'
              placeholder='请输入患者姓名'
              value={this.state.value}
              onChange={this.handleChange.bind(this)}
            />
          </View>


          <View className='box'>
            <View className='xiangming1'>年龄 *</View>
			<AtInput className='shuru'
			        maxLength='2'
              name='value'
              type='number'
              placeholder='请输入年龄'
              value={this.state.ageDel}
              onChange={this.changeAge.bind(this)}
            />
          </View>

          <View className='box'>
            <View className='xiangming'>性别 *</View>
			<View className='selectorBox'>
				<Picker className='pickerBox' mode='selector' range={this.state.sex} onChange={this.onChangeSex}>
                    <View className='aaa'>
                        <View className='picker'>{this.state.sexDel}</View>
                        <AtIcon className='AtIcon' value='chevron-down' size='22' color='#999'></AtIcon>
                    </View>
				</Picker>
				
			</View>
          </View>

          <View className='box'>
            <View className='xiangming'>职业 *</View>
			<View className='selectorBox'>
				<Picker className='pickerBox' mode='selector' range={this.state.jobName} onChange={this.onChangeJob}>
                    <View className='aaa'>
                        <View className='picker'>{this.state.jobNameDel}</View>
                        <AtIcon className='AtIcon' value='chevron-down' size='22' color='#999'></AtIcon>
                    </View>
				</Picker>
			</View>
          </View>

		  <View className='box'>
            <View className='xiangming1'>手机号码</View>
			<AtInput className='shuru'
			       maxLength='11'
              name='value'
              type='number'
              placeholder='请输入手机号码'
              value={this.state.value99}
              onChange={this.handleChange99.bind(this)}
            />
          </View>

          <View className='box4'><View className='box5'>检查数据（带 * 为必填部分）</View></View>
          <View className='box1'>
            <View className='xiangmu'>项目</View>
            <View className='youyanz'>右眼</View>
            <View className='zuoyanz'>左眼</View>
          </View>
          <View className='box'>
            <View className='xiangmu1'>主视眼 *</View>
            <View className='youyan4'>
              <AtRadio
                options={[
                  { label: '右眼', value: 'option1' },
                  { label: '左眼', value: 'option2' },
                ]}
                value={this.state.value35}
                onClick={this.handleChange35.bind(this)}
              />
            </View>
          </View>

          <View className='box'>
            <View className='xiangming2'>裸眼视力</View>
			<AtInput className='shuru1'
			        maxLength='4'
              name='value'
              type='text'
              placeholder='右眼'
              value={this.state.value3}
              onChange={this.handleChange3.bind(this)}
            />
			<AtInput className='shuru1'
			        maxLength='4'
              name='value'
              type='text'
              placeholder='左眼'
              value={this.state.value4}
              onChange={this.handleChange4.bind(this)}
            />
          </View>
          
          <View className='box'>
            <View className='xiangming2'>球径</View>
			<AtInput className='shuru1'
			  maxLength='6'
              name='value'
              type='text'
              placeholder='右眼'
              value={this.state.value5}
              onChange={this.handleChange5.bind(this)}
            />
			<AtInput className='shuru1'
			  maxLength='6'
              name='value'
              type='text'
              placeholder='左眼'
              value={this.state.value6}
              onChange={this.handleChange6.bind(this)}
            />
          </View>

          <View className='box'>
            <View className='xiangming2'>柱镜</View>
			<AtInput className='shuru1'
			  maxLength='4'
              name='value'
              type='text'
              placeholder='右眼'
              value={this.state.value7}
              onChange={this.handleChange7.bind(this)}
            />
			<AtInput className='shuru1'
			  maxLength='4'
              name='value'
              type='text'
              placeholder='左眼'
              value={this.state.value8}
              onChange={this.handleChange8.bind(this)}
            />
          </View>

          <View className='box'>
            <View className='xiangming2'>轴向</View>
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='右眼'
              value={this.state.value9}
              onChange={this.handleChange9.bind(this)}
            />
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='左眼'
              value={this.state.value10}
              onChange={this.handleChange10.bind(this)}
            />
          </View>

          <View className='box'>
            <View className='xiangming2'>最佳矫正视力</View>
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='右眼'
              value={this.state.value11}
              onChange={this.handleChange11.bind(this)}
            />
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='左眼'
              value={this.state.value12}
              onChange={this.handleChange12.bind(this)}
            />
          </View>

          <View className='box'>
            <View className='xiangmu1'>近一年屈光稳定 * </View>
 
			<View className='selectorBox'>
				<Picker className='pickerBox-a' mode='selector' range={this.state.boolean1} onChange={this.onChangeBoolean1}>
					<View className='picker-a'>{this.state.boolean1Del}</View>
				</Picker>
				<AtIcon className='AtIcon-a' value='chevron-down' size='22' color='#999'></AtIcon>
			</View>

			<View className='selectorBox'>
				<Picker className='pickerBox-b' mode='selector' range={this.state.boolean2} onChange={this.onChangeBoolean2}>
					<View className='picker-a'>{this.state.boolean2Del}</View>
				</Picker>
				<AtIcon className='AtIcon-a' value='chevron-down' size='22' color='#999'></AtIcon>
			</View>

          </View>

          <View className='box'>
            <View className='xiangming3'>WTW测量方法</View>
			<View className='selectorBox-a'>
				<Picker className='pickerBox' mode='selector' range={this.state.wtw} onChange={this.onChangeWTW}>
                    <View className='aaa'>
                        <View className='picker'>{this.state.wtwDel}</View>
                        <AtIcon className='AtIcon' value='chevron-down' size='22' color='#999'></AtIcon>
                    </View>
				</Picker>
				
			</View>
          </View>
          
          <View className='box'>
            <View className='xiangming2'>角膜水平直径 WTW</View>
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='右眼'
              value={this.state.value26}
              onChange={this.handleChange26.bind(this)}
            />
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='左眼'
              value={this.state.value27}
              onChange={this.handleChange27.bind(this)}
            />
          </View>
          
          <View className='box'>
            <View className='xiangming2'>眼压</View>
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='右眼'
              value={this.state.value13}
              onChange={this.handleChange13.bind(this)}
            />
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='左眼'
              value={this.state.value14}
              onChange={this.handleChange14.bind(this)}
            />
          </View>
          <View className='box'>
            <View className='xiangming2'>瞳孔直径（明视）</View>
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='右眼'
              value={this.state.value15}
              onChange={this.handleChange15.bind(this)}
            />
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='左眼'
              value={this.state.value16}
              onChange={this.handleChange16.bind(this)}
            />
          </View>
          <View className='box'>
            <View className='xiangming2'>瞳孔直径（暗视）</View>
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='右眼'
              value={this.state.value17}
              onChange={this.handleChange17.bind(this)}
            />
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='左眼'
              value={this.state.value18}
              onChange={this.handleChange18.bind(this)}
            />
          </View>
          <View className='box'>
            <View className='xiangming2'>角膜曲率（K1）</View>
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='右眼'
              value={this.state.value19}
              onChange={this.handleChange19.bind(this)}
            />
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='左眼'
              value={this.state.value20}
              onChange={this.handleChange20.bind(this)}
            />
          </View>

          <View className='box'>
            <View className='xiangming2'>K1轴向</View>
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='右眼'
              value={this.state.valueaa}
              onChange={this.handleChangeaa.bind(this)}
            />
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='左眼'
              value={this.state.valuebb}
              onChange={this.handleChangebb.bind(this)}
            />
          </View>

          <View className='box'>
            <View className='xiangming2'>角膜曲率(K2)</View>
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='右眼'
              value={this.state.value21}
              onChange={this.handleChange21.bind(this)}
            />
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='左眼'
              value={this.state.value22}
              onChange={this.handleChange22.bind(this)}
            />
          </View>

          <View className='box'>
            <View className='xiangming2'>K2轴向</View>
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='右眼'
              value={this.state.valuecc}
              onChange={this.handleChangecc.bind(this)}
            />
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='左眼'
              value={this.state.valuedd}
              onChange={this.handleChangedd.bind(this)}
            />
          </View>

          
          
          <View className='box'>
            <View className='xiangming2'>角膜内表皮细胞计数</View>
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='右眼'
              value={this.state.value24}
              onChange={this.handleChange24.bind(this)}
            />
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='左眼'
              value={this.state.value25}
              onChange={this.handleChange25.bind(this)}
            />
          </View>
          
          <View className='box'>
            <View className='xiangming2'>前房深度(不含角膜厚度)</View>
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='右眼'
              value={this.state.value28}
              onChange={this.handleChange28.bind(this)}
            />
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='左眼'
              value={this.state.value29}
              onChange={this.handleChange29.bind(this)}
            />
          </View>
          <View className='box'>
            <View className='xiangming2'>眼轴长度</View>
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='右眼'
              value={this.state.value30}
              onChange={this.handleChange30.bind(this)}
            />
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='左眼'
              value={this.state.value31}
              onChange={this.handleChange31.bind(this)}
            />
          </View>

          

          <View className='box'>
            <View className='xiangming2'>医生期望矫正度数</View>
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='右眼'
              value={this.state.value97}
              onChange={this.handleChange97.bind(this)}
            />
            <AtInput className='shuru1'
              name='value'
              type='text'
              placeholder='左眼'
              value={this.state.value98}
              onChange={this.handleChange98.bind(this)}
            />
          </View>

          
          <View className='box'>
            <View className='xiangminga'>医生预期手术时间 *</View>
			<View className='selectorBox-a'>
				<Picker className='pickerBox' mode='date' onChange={this.onTimeChange}>
                    <View className='aaa'>
                        <View className='picker'>{this.state.timeSel}</View>
                        <AtIcon className='AtIcon' value='chevron-down' size='22' color='#999'></AtIcon>
                    </View>
				</Picker>
			</View>
          </View>

          <View className='box'>
            <View className='xiangming4'>备注</View>
            <AtInput className='shuru2'
              name='value'
              type='text'
              placeholder='请填写备注'
              value={this.state.value34}
              onChange={this.handleChange34.bind(this)}
            />
          </View>
        </AtList>

        <View className='empty'></View>
        <View className='bottom'>
            <AtButton className='AtBtn' type='primary' onClick={this.go.bind(this,0)} customStyle='background:orange'>计算</AtButton>
            <AtButton className='AtBtn' type='primary' onClick={this.go.bind(this,1)} customStyle='background:blue'>保存草稿</AtButton>
            <AtButton className='AtBtn' type='primary' onClick={this.go.bind(this,2)}>保存订单</AtButton>
        </View>

        <AtModal isOpened={this.state.isOpened}>
            <View className='messageBox'>
                <AtModalHeader>医生期望矫正度数:<Text>55</Text>; 型号:000<Text></Text></AtModalHeader>
                <ScrollView scrollY className='scrollH'>
                {
                  this.state.calculateData.map((item,index)=>{
                    return <View className='itemModel'>
                        <View className='modelHeader'>
                            <Checkbox className='checkbox-list__checkbox' value={item.analogFocal}>
                                  <View className={item.bestFangan == 1 ? 'calculateAll calculates' : 'calculateAll'}>{item.bestFangan == 1 ? '推荐方案' : '方案'+index}</View>
                            </Checkbox>
                        </View>
                        <View className='calculate_con'>
                            <View className='calculate_an'>
                                  <Text>实际矫正度数:{item.analogFocal}</Text>
                            </View>
                            <View className='calculate_pro'>(产品标识:<Text>{item.producIdentification}</Text>)</View>
                            <View className='calculate_ex'>实际与期望矫正度数差值:<Text>{item.expectDegreesDifference}</Text></View>
                        </View>
                    </View>
                  })
                }
                </ScrollView>
                <AtModalAction> <Button className='saves'>保存</Button> <Button className='closes' onClick={this.closeModel.bind(this)}>关闭</Button> </AtModalAction>
            </View>
        </AtModal>
      </View>
    )

  }


}